using System;
using System.ComponentModel;

namespace PickGold.Charting.Design
{
	internal class AreaCollectionEditor : ChartCollectionEditor
	{
		public AreaCollectionEditor()
			: base(typeof(ChartAreaCollection))
		{
		}

		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			if (((context != null) && (context.Instance != null)) && (context.Instance is Chart))
			{
				Chart.ControlCurrentContext = context;
			}
			return base.EditValue(context, provider, value);
		}
	}
}

